<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>模板管理 - 大模型文档智能生成平台</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    <style>
        /* [跟上面页面完全相同的CSS，为了独立运行，这里全部复制一份] */
        :root {
            --primary-color: #006838;
            --accent-color: #B58E55;
            --bg-color: #f4f6f9;
            --text-color: #333;
            --border-color: #e0e0e0;
            --sidebar-width: 240px;
            --header-height: 60px;
        }

        body {
            margin: 0;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
            background-color: var(--bg-color);
            color: var(--text-color);
            font-size: 14px;
        }

        .app-container { display: flex; height: 100vh; }
        .sidebar { width: var(--sidebar-width); background-color: #ffffff; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; }
        .sidebar-header { display: flex; align-items: center; justify-content: center; padding: 0 15px; height: var(--header-height); border-bottom: 1px solid var(--border-color); }
        .logo { height: 35px; margin-right: 10px; }
        .sidebar-header h1 { font-size: 16px; font-weight: 600; color: var(--primary-color); white-space: nowrap; }
        .sidebar-nav { flex-grow: 1; padding: 20px 0; }
        .sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
        .sidebar-nav li a { display: flex; align-items: center; padding: 12px 20px; color: #555; text-decoration: none; transition: all 0.2s; font-weight: 500; }
        .sidebar-nav li a:hover { background-color: #f0f7f2; color: var(--primary-color); }
        .sidebar-nav li a.active { background-color: var(--primary-color); color: white; border-right: 4px solid var(--accent-color); }
        .sidebar-nav li a .fa-fw { margin-right: 15px; width: 20px; text-align: center; }
        .main-wrapper { flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; }
        .header { height: var(--header-height); background-color: #fff; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: flex-end; padding: 0 30px; }
        .header-actions { display: flex; align-items: center; gap: 25px; }
        .header-actions .icon-btn { font-size: 18px; color: #666; cursor: pointer; }
        .user-profile { display: flex; align-items: center; gap: 10px; }
        .user-profile img { width: 36px; height: 36px; border-radius: 50%; }
        .user-profile span { font-weight: 500; }
        .main-content { flex-grow: 1; padding: 30px; overflow-y: auto; }
        h2.page-title { font-size: 24px; font-weight: 600; margin-top: 0; margin-bottom: 25px; }
        .btn { padding: 10px 20px; border-radius: 5px; border: 1px solid transparent; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s; }
        .btn-primary { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }
        .btn-primary:hover { background-color: #005a2f; }
        .btn-secondary { background-color: #f0f0f0; color: #555; border-color: #ccc; }
        .btn-secondary:hover { background-color: #e0e0e0; }
        .toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .search-box { display: flex; align-items: center; border: 1px solid var(--border-color); border-radius: 5px; padding: 0 10px; background: #fff; }
        .search-box input { border: none; outline: none; padding: 10px 5px; font-size: 14px; width: 250px; }
        .search-box i { color: #999; }

        /* Template Card Styles */
        .card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 25px;
        }
        .template-card {
            background: #fff;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            transition: box-shadow 0.3s, transform 0.3s;
        }
        .template-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .template-card-icon {
            text-align: center;
            padding: 25px 0;
            font-size: 50px;
        }
        .template-card-icon .fa-file-word { color: #2b579a; }
        .template-card-icon .fa-file-pdf { color: #B30B00; }
        .template-card-icon .fa-file-excel { color: #1D6F42; }
        
        .template-card-info {
            padding: 15px;
            border-top: 1px solid #f0f0f0;
            flex-grow: 1;
        }
        .template-card-info h4 {
            font-size: 15px;
            margin: 0 0 10px 0;
            font-weight: 600;
        }
        .template-card-info p {
            font-size: 13px;
            color: #777;
            margin: 0;
        }
        .template-card-actions {
            background: #f8f9fa;
            padding: 10px 15px;
            text-align: right;
        }
        .template-card-actions .btn-icon {
            background: none; border: none; font-size: 16px; color: #666; cursor: pointer; margin-left: 15px;
        }
        .template-card-actions .btn-icon:hover { color: var(--primary-color); }
    </style>
</head>
<body>
    <div class="app-container">
        <!-- Sidebar -->
        <aside class="sidebar">
            <div class="sidebar-header">
                <img src="https://i.imgur.com/uTjxkMh.png" alt="Logo" class="logo">
                <h1>文档智能生成平台</h1>
            </div>
            <nav class="sidebar-nav">
                <ul>
                    <li><a href="#"><i class="fas fa-cog fa-fw"></i> 系统管理</a></li>
                    <li><a href="#"><i class="fas fa-database fa-fw"></i> 数据获取</a></li>
                    <li><a href="#" class="active"><i class="fas fa-file-alt fa-fw"></i> 模板管理</a></li>
                    <li><a href="#"><i class="fas fa-cogs fa-fw"></i> 内容配置</a></li>
                    <li><a href="#"><i class="fas fa-receipt fa-fw"></i> 流水解析</a></li>
                    <li><a href="#"><i class="fas fa-magic fa-fw"></i> 文档生成</a></li>
                </ul>
            </nav>
        </aside>

        <!-- Main Wrapper -->
        <div class="main-wrapper">
             <!-- Header -->
            <header class="header">
                 <div class="header-actions">
                    <i class="fas fa-bell icon-btn"></i>
                    <i class="fas fa-question-circle icon-btn"></i>
                    <div class="user-profile">
                        <img src="https://i.pravatar.cc/40?u=admin" alt="User Avatar">
                        <span>王经理</span>
                        <i class="fas fa-chevron-down"></i>
                    </div>
                </div>
            </header>

            <!-- Main Content -->
            <main class="main-content">
                <div class="toolbar">
                    <div class="search-box">
                        <i class="fas fa-search"></i>
                        <input type="text" placeholder="搜索模板名称...">
                    </div>
                    <button class="btn btn-primary">
                        <i class="fas fa-upload"></i> 上传新模板
                    </button>
                </div>

                <div class="card-grid">
                    <!-- Template 1 -->
                    <div class="template-card">
                        <div class="template-card-icon"><i class="fas fa-file-word"></i></div>
                        <div class="template-card-info">
                            <h4>小微授信业务调查表</h4>
                            <p>版本: v2.3<br>更新于: 2025-07-03</p>
                        </div>
                        <div class="template-card-actions">
                            <i class="fas fa-edit btn-icon" title="编辑"></i>
                            <i class="fas fa-history btn-icon" title="版本历史"></i>
                            <i class="fas fa-trash btn-icon" title="删除" style="color: #dc3545;"></i>
                        </div>
                    </div>
                    <!-- Template 2 -->
                    <div class="template-card">
                        <div class="template-card-icon"><i class="fas fa-file-pdf"></i></div>
                        <div class="template-card-info">
                            <h4>个人贷款申请表</h4>
                            <p>版本: v1.1<br>更新于: 2025-06-15</p>
                        </div>
                        <div class="template-card-actions">
                            <i class="fas fa-edit btn-icon" title="编辑"></i>
                            <i class="fas fa-history btn-icon" title="版本历史"></i>
                            <i class="fas fa-trash btn-icon" title="删除" style="color: #dc3545;"></i>
                        </div>
                    </div>
                     <!-- Template 3 -->
                    <div class="template-card">
                        <div class="template-card-icon"><i class="fas fa-file-excel"></i></div>
                        <div class="template-card-info">
                            <h4>企业财务状况分析报告</h4>
                            <p>版本: v3.0<br>更新于: 2025-05-20</p>
                        </div>
                        <div class="template-card-actions">
                            <i class="fas fa-edit btn-icon" title="编辑"></i>
                            <i class="fas fa-history btn-icon" title="版本历史"></i>
                            <i class="fas fa-trash btn-icon" title="删除" style="color: #dc3545;"></i>
                        </div>
                    </div>
                    <!-- Template 4 -->
                    <div class="template-card">
                        <div class="template-card-icon"><i class="fas fa-file-word"></i></div>
                        <div class="template-card-info">
                            <h4>贷后检查报告</h4>
                            <p>版本: v1.8<br>更新于: 2025-07-01</p>
                        </div>
                        <div class="template-card-actions">
                            <i class="fas fa-edit btn-icon" title="编辑"></i>
                            <i class="fas fa-history btn-icon" title="版本历史"></i>
                            <i class="fas fa-trash btn-icon" title="删除" style="color: #dc3545;"></i>
                        </div>
                    </div>
                </div>
            </main>
        </div>
    </div>
</body>
</html>